<layout name="layout"/>

<p>
<!-- Button trigger modal -->
<button type="button" class="uk-button uk-button-success" data-uk-modal="{target:'#myModal',center:true}">
{$Think.lang.add_new}
</button>
</p>
<form class="uk-form">
    <div class="uk-grid">
		<div class="uk-width-1-4">{$Think.lang.aff_id}:<input type="text" name="aff_id" placeholder="" class="uk-width-1-1"></div>
        <div class="uk-width-1-4">{$Think.lang.mh_id}:<input type="text" name="mh_id" placeholder="" class="uk-width-1-1"></div>
    </div>
	<p>
<button type="submit" class="uk-button uk-button-danger">{$Think.lang.search}</button>
</p>
</form>
          <div class="uk-overflow-container">
            <table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">
	<thead>
		<th>#</th><th>{$Think.lang.aff_id}</th>		<th>{$Think.lang.mh_id}</th>		<th>{$Think.lang.process_rate}</th>		
		<th>{$Think.lang.refund_fee}</th>	<th>{$Think.lang.cb_fee}</th> <th>{$Think.lang.failed_fee}</th>	<th>{$Think.lang.fixed_fee}</th>
		<th>--</th>
	</thead>
	<tbody>
		<volist name="list" id="vo">
		<tr>
		<td><a href="__CONTROLLER__/details/{$vo.aff_mh_id}">{$vo.aff_mh_id}</a></td>
			<td>{$vo.aff_id}</td><td>{$vo.mh_id}</td>
			<td>{$vo.aff_rate}</td><td>{$vo.aff_refund_fee}</td><td>{$vo.aff_cb_fee}</td>
			<td>{$vo.aff_failed_fee}</td><td>{$vo.aff_fixed_fee}</td>
			<td>
				<a href="javascript:void(0)" onclick="confirmDelete('__CONTROLLER__/deleteHandle/{$vo.aff_mh_id}')">
					<i class="uk-icon-trash"></i>
				</a>				
			</td>
		</tr>
		</volist>
	</tbody>
</table>
</div>
{$page}

<!-- Modal -->
<div class="uk-modal" id="myModal">
 <form id="validate_form" class="uk-form"  method="post" action="__CONTROLLER__/addHandle">
    <div class="uk-modal-dialog"> <a class="uk-modal-close uk-close"></a>
        <div class="uk-modal-header">{$Think.lang.add_new}</div>
<div class="uk-text-warning">{$Think.lang.tip}</div>
<table class="uk-table">
<tr><td  width=180>{$Think.lang.aff_id}</td><td>
<input type="text" name="aff_id"  required   />
</td></tr>
<tr><td>{$Think.lang.mh_id}</td><td>
<input type="text" name="mh_id"  required   />
</td></tr>

<tr><td  >{$Think.lang.process_rate}</td><td>
<input type="text" name="aff_rate"  required min="0" max="0.2" number="true"  value="0.02" />
</td></tr>
<tr><td  >{$Think.lang.refund_fee}</td><td>
<input type="text" name="aff_refund_fee"  required  number="true" min="0" value="0"  />
</td></tr>
<tr><td  >{$Think.lang.cb_fee}</td><td>
<input type="text" name="aff_cb_fee"  required number="true"  value="0" min="0" />
</td></tr>
<tr><td  >{$Think.lang.failed_fee}</td><td>
<input type="text" name="aff_failed_fee"  required number="true"  value="0" min="0" />
</td></tr>
<tr><td  >{$Think.lang.fixed_fee}</td><td>
<input type="text" name="aff_fixed_fee"  required  value="0" min="0" number="true" />
</td></tr>
</table>
        <div class="uk-modal-footer uk-text-right">
		<button class="uk-button uk-button-danger" type="submit">{$Think.lang.save}</button>
		</div>
    </div>
  </form> 
</div>